package tech.aistar.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.entity.Film;
import tech.aistar.mapper.FilmMapper;

import java.util.List;

/**
 * 本类用来演示
 *
 * @author success
 * @date 2023/3/5 16:24:11
 */
@Service
public class FilmService implements FilmMapper {
    @Autowired
    private FilmMapper filmMapper;

    @Override
    public List<Film> findAll() {
        return filmMapper.findAll();
    }

    @Override
    public Film getFilm(int id) {
        return filmMapper.getFilm(id);
    }

    @Override
    public int delete(int id) {
        return filmMapper.delete(id);
    }

    @Override
    public int save(Film film) {
        return filmMapper.save(film);
    }

    @Override
    public int update(Film film) {
        return filmMapper.update(film);
    }
}
